import 'package:flutter/material.dart';
import 'dart:async';

class DialogUtil {


 static Future<bool> showAlertDailog<bool>(BuildContext context,String msg) {
    return showDialog<bool>(
        context: context,
        builder: (context) {
          return AlertDialog(
            title: Text('提醒'),
            content: Text(msg),
            actions: <Widget>[
              FlatButton(
                  onPressed: () {
                    Navigator.of(context).pop(false);
                  },
                  child: Text('取消')),
              FlatButton(
                  onPressed: () {
                    Navigator.of(context).pop(true);
                  },
                  child: Text('确定')),
            ],
          );
        });
  }



}
